/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.support.e;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import com.qihoo.gamecenter.sdk.common.a.c;
import com.qihoo.gamecenter.sdk.support.systemmessage.b;

public class a {
    private static a a = null;
    private Context b;

    private a(Context paramContext) {
        this.b = paramContext;
    }

    public static a a(Context paramContext) {
        if (a == null)
            a = new a(paramContext);
        return a;
    }

    public void a(boolean paramBoolean) {
        com.qihoo.gamecenter.sdk.support.g.a.a("SettingsManager", new Object[] { "syncLoginStatusToFloatWindow login: "
                + paramBoolean });
        try {
            Intent localIntent = new Intent("com.qihoo.gamecenter.sdk.suspend.local.QLocalService");
            String str1 = "";
            String str2 = "";
            String str3 = this.b.getPackageName();
            ComponentName localComponentName = new ComponentName(str3,
                    "com.qihoo.gamecenter.sdk.suspend.local.QLocalService");
            localIntent.setComponent(localComponentName);
            if (paramBoolean) {
                b.a(this.b).c();
                str1 = c.c();
                str2 = c.h();
            }
            else {
                b.a(this.b).d();
                c.j();
                c.a();
            }
            com.qihoo.gamecenter.sdk.support.g.a.a("SettingsManager", new Object[] {
                    "start float window local service, qid: ", str1, " qt: ", str2, " pkg: ", str3 });
            localIntent.putExtra("fQid", str1);
            localIntent.putExtra("fQt", str2);
            localIntent.putExtra("loginPkgname", str3);
            this.b.startService(localIntent);
        } catch (Throwable localThrowable) {
            com.qihoo.gamecenter.sdk.support.g.a.c("SettingsManager", new Object[] { "startFloatWndService Error!",
                    localThrowable.toString() });
        }
    }
}